﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>会员管理</title>
    <link href="~/plugins/layui/css/layui.css" rel="stylesheet" />
</head>
<body style="margin-left:10px;margin-top:10px;">
    <div id="ss" class="layui-form-item">
        <div class="layui-inline">
            <div class="layui-input-inline" style="width: 30px;">
                <i class="layui-icon" style="font-size: 30px; color: #1E9FFF;">&#xe615;</i>
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input type="text" placeholder="账户" name="account" class="layui-input" />
            </div>
            <div class="layui-input-inline layui-hide" style="width: 150px;">
                <input type="text" placeholder="真实姓名" name="real_name" class="layui-input" />
            </div>
            <div class="layui-input-inline" style="width: 150px;">
                <input class="layui-input" placeholder="注册开始日期" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" name="stime" value="@ViewBag.stime">
            </div>
            <div class="layui-form-mid">-</div>
            <div class="layui-input-inline" style="width: 150px;">
                <input class="layui-input" placeholder="注册结束日期" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" name="etime" value="@ViewBag.etime">
            </div>
            <div class="layui-input-inline layui-hide" style="width: 150px;">
                <input class="layui-input" placeholder="收入开始日期" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" name="pstime" value="@ViewBag.pstime">
            </div>
            <div class="layui-form-mid layui-hide">-</div>
            <div class="layui-input-inline layui-hide" style="width: 150px;">
                <input class="layui-input" placeholder="收入结束日期" onclick="layui.laydate({elem: this, istime: true, format: 'YYYY-MM-DD hh:mm:ss'})" name="petime" value="@ViewBag.petime">
            </div>
            <div class="layui-input-inline">
                <button onclick="getlist(1);" class="layui-btn">给偶搜</button>
            </div>
        </div>
    </div>
    <div class="layui-form">
        <table class="layui-table">
            <thead>
                <tr>
                    <th>会员帐号</th>
                    <th>余额</th>
                    <th>注册时间</th>
                    <th>备注</th>
                    <th>用户记录</th>
                    <th>管理套餐</th>
                    <th>管理操作</th>
                </tr>
            </thead>
            <tbody id="tbody">
                <script id="tpl" type="text/html">
                    {{each list as item index}}
                <tr id="{{item.gid}}">
                    <td>{{item.account}}<br /><button class="layui-btn layui-btn-mini layui-btn-danger layui-btn-radius" onclick="hymima('{{item.gid}}');">重设密码</button></td>
                    <td>{{item.rmb}}</td>
                    <td>{{item.addtime}}</td>
                    <td>{{item.explain}}</td>
                    <td>
                        <div>
                            <button class="layui-btn layui-btn-mini" onclick="Showiframe('{{item.account}}','/ljsheng/ddlist?usergid={{item.gid}}');">订单记录</button>
                        </div>
                    </td>
                    <td>
                        <div class="layui-btn-group">
                            <button class="layui-btn layui-btn-mini" onclick="Showiframe('{{item.account}}','/ljsheng/tclist?usergid={{item.gid}}');">套餐</button>
                        </div>
                    </td>
                    <td>
                        <div class="layui-btn-group">
                            <button class="layui-btn layui-btn-mini" onclick="Showiframe('{{item.account}}','/ljsheng/hyau?gid={{item.gid}}');">编辑</button>
                        </div>
                    </td>
                </tr>
                    {{/each}}
                </script>
            </tbody>
        </table>
    </div>
    <div id="page"></div>
    共 <label id="pages">0</label> 页, <label id="count">0</label> 条数据 
    <label id="Controllers" class="layui-hide">hy</label>
    <script src="~/js/jquery.js"></script>
    <script src="~/plugins/layui/layui.js"></script>
    <script src="~/js/template-web.js"></script>
    <script src="~/js/list.js"></script>
    <script src="~/js/daochu.js"></script>
    <script>
        //重设密码
        function hymima(gid) {
            layer.confirm('你确定要执行此操作吗？', {
                btn: ['确定', '取消'] //按钮
            }, function () {
                $.ajax({
                    url: "/ljsheng/hymima",
                    data: "gid=" + gid,
                    type: "post",
                    cache: false,
                    timeout: 8000,
                    dataType: "json",
                    ContentType: "application/json; charset=utf-8",
                    error: function () { layer.msg("请求超时"); },
                    beforeSend: function () { },
                    success: function (data) {
                        if (data.result == 200) {
                            layer.msg(data.data, { icon: 1 });
                        }
                        else {
                            layer.msg(data.data);
                        }
                    },
                });
            });
        }
    </script>
</body>
</html>
